package org.am.util;

import org.am.ether.ext.EtherWeb3jExceptioin;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class CodecUtils {
    public static byte[] getSHA256(byte[] seed) {
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.update(seed);
            return messageDigest.digest();
        } catch (NoSuchAlgorithmException e) {
            throw new EtherWeb3jExceptioin(e);
        }
    }
}
